<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Login</title>
        <!--        <link href=""></link>-->
    </h:head>
    <h:body style="text-align:center">
        <h:form>
            <p:growl id="mensajes" sticky="true" showDetail="true" life="3000" />

            <p:panel header="Ingrese los datos" style="width:300px">
                <h:panelGrid columns="2" cellpadding="5">
                    <h:outputLabel for="username" value="Usuario:" />
                    <p:inputText value="#{loginBean.user}" id="username"
                                 required="true" label="username" />
                    <h:outputLabel for="password" value="Clave:" />
                    <p:password value="#{loginBean.password}" id="password" required="true" label="password" />
                    <f:facet name="footer">
                        <p:commandButton id="loginButton" 
                                         value="Aceptar" 
                                         action="#{loginBean.validarLogin}"  
                                         oncomplete="handleLoginRequest(xhr, status, args)" 
                        />
                    </f:facet>
                </h:panelGrid>
            </p:panel>
        </h:form>
    </h:body>
</html>